import request from "@/services/axios";

/**
 * 接口API
 */
const Api = {
  /**
   * @returns {*}
   * @param params
   */
  getPrescriptionList(params) {
    return request.get({
      url: "/api/qcss/prescription/list",
      params
    });
  },
  /**
   * 获取排班信息
   * @param params
   * @returns {Promise<*>}
   */
  getScheduleList(params) {
    return request.get({
      url: "/api/qcss/led/scheduleList",
      params
    });
  },
};
/**
 * 上海市一
 */
const ApiShangHaiShiYiXianUtil = {
  /**
   * 获取医生信息
   * @param self
   * @param apiData
   * @returns {Promise<void>}
   */
  async getPrescriptionList(self, apiData) {
    // 获取接口数据
    const formJson = {
      terminalId: self.deviceInfo.screenId,
    };
    const {code, data} = await Api.getPrescriptionList(formJson);
    return data || [];
  },
  /**
   * 信息发布-医生排班
   * @param self
   * @param apiData
   * @returns {Promise<*|*[]>}
   */
  async getScheduleList(self, apiData) {
    // 获取接口数据
    const formJson = {
      terminalId: self.deviceInfo.screenId,
    };
    const {code, data} = await Api.getScheduleList(formJson);
    return data || [];
  }

};
export {ApiShangHaiShiYiXianUtil};
